import httpAxios from '../utils/httpAxios'

// 获取所有的数据
export const getRess = () => {
    return httpAxios.get('/list')
}

// 添加
export const addRess = (obj: any) => {
    return httpAxios.post('/list/add', obj)
}

// 查询某一条数据
export const getdetail = (id: any) => {
    return httpAxios.get('detail/' + id)
}

// 修改
export const updateRess = (obj: any) => {
    console.log(obj);
    return httpAxios.post('/list/update', obj)
}

// 删除
export const delRess = (id: any) => {
    return httpAxios.post('/list/del', {id})
}